import React, { useId, useState } from 'react'

export default function UseIdDemo() {
  const id = useId()
  const id2 = useId()

  const [list, setList] = useState(['a', 'b', 'c'])
  
  return (
    <>
      <div>UseIdDemo</div>
      <div>{id2}</div>
      <div>
        <input id={id} type="text" />
      </div>
      <ul>
        {
          list.map((li) => {
            // const id3 = useId()
            return (
              <li key={li}>{li}</li>
            )
          })
        }
      </ul>
    </>
  )
}
